package 落谷.枚举;

/**
 * P1008三连击
 *
 * @author yang
 * @date 2021/12/23
 */
public class P1008三连击 {

    public static void main(String[] args) {

        for (int i = 123; i < 333; i++) {
            int[] a = new int[10];
            int[] b = new int[10];
            int[] c = new int[10];
            a[1] = i % 10;
            a[2] = i % 100 / 10;
            a[3] = i / 100;
            b[1] = 2 * i % 10;
            b[2] = 2 * i % 100 / 10;
            b[3] = 2 * i / 100;
            c[1] = 3 * i % 10;
            c[2] = 3 * i % 100 / 10;
            c[3] = 3 * i / 100;
            if (a[1]+a[2]+a[3]+b[1]+b[2]+b[3]+c[1]+c[2]+c[3]==45 && a[1]*a[2]*a[3]*b[1]*b[2]*b[3]*c[1]*c[2]*c[3]==362880) {
                System.out.println(i + " " + 2 * i + " " + 3 * i);
            }
        }
    }
}


